import request from '@/utils/request'
//例子，不要
export function getList(params) {
  return request({
    url: '/vue-admin-template/table/list',
    method: 'get',
    params
  })
}

//前台显示，参数是卷码
export function ExamList(data){
  return request({
    url:'math/getExam.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}

export function ExamListTest(data) {
  return request({
    url: 'math/getExam.aspx',
    method: 'get',
    params: { data }
  })
}

//主要区别带不带用户名
export function QuestionList(data){
  return request({
    url:'math/getQuestion.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}

export function addQuestion(data){
  return request({
    url:'math/addQuestion.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}
export function uploadFile(data){
  return request({
    url:'math/uploadFile.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}
//编辑题目
export function updateQuestion(data){
  return request({
    url:'math/updateQuestion.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}
export function updateAnswer(data){
  return request({
    url:'math/updateAnswer.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}
export function deleteQuestion(data){
  return request({
    url:'math/deleteQuestion.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}

/****************************************************************** */

export function addPaper(data){
  return request({
    url:'math/addPaper.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}

export function PaperList(data){
  return request({
    url:'math/getpaper.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}

export function updatePaperSelect(data){
  return request({
    url:'math/updateSelect.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}
export function updateShowAnswer(data){
  return request({
    url:'math/updateShow.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}
export function deletePaper(data){
  return request({
    url:'math/deletePaper.aspx',
    method:'post',
    headers: {'Content-Type': 'application/json'},
    data
  })
}